﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SeleniumExtension.Utilities
{
    public class Utilities
    {
        /// <summary>
        /// Get a valid filename based on test case execution Url
        /// </summary>
        /// <param name="Url"></param>
        /// <returns></returns>
        public static string GetFileName(string Url)
        {
            var fileName = Url.Replace("/", "").Replace(":", "").Replace(".", "").Replace("-", "");
            fileName = string.Format("{0}{1}.{2}", fileName, DateTime.Now.ToString("hh-mm-ss"), "png");
            return fileName;
        }
    }
}
